//
//  PersonAbstractModelAlbum.m
//  __PRODUCTNAME__
//
//  Created by Hanlingyu on 16/09/16
//  Copyright (c) ltq. All rights reserved.
//

#import "PersonAbstractModelAlbum.h"
#import "PersonAbstractModelPost.h"

@implementation PersonAbstractModelAlbum

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"post"]) {
        NSMutableArray *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            PersonAbstractModelPost *post = [PersonAbstractModelPost modelWithDic:dic];
            [array addObject:post];
        }
        _post = array;
    }
}


+ (NSDictionary *)objectClassInArray{
    return @{@"post" : [PersonAbstractModelPost class]};
}

@end
